package com.ltt.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.ltt.service.FileService;
import com.ltt.utils.FileUtils;
import com.ltt.utils.PlantUtil;
import org.springframework.stereotype.Service;

/**
 * @Author: ltt
 * @Description: TODO
 * @Date: 2023/5/1 22:07
 * @Version: 1.0.0
 */
@Service
public class FileServiceImpl implements FileService {

    @Override
    public String upload(byte[] imgData,String originalFilename) {
        String image = FileUtils.uploadImage(imgData, originalFilename);
        return image;
    }

    @Override
    public JSONObject plant(String token, String url) {
        return PlantUtil.plant(token, url);
    }
}
